//
//  CMCommon.h
//  CardManage
//
//  Created by 斌 on 2017/11/4.
//  Copyright © 2017年 mupay. All rights reserved.
//

#import <UIKit/UIKit.h>
@interface CMCommon : NSObject

//获取文本宽度
+ (CGFloat)getStringWidthWithLabel:(UILabel *)label;

typedef enum
{
    BankImageStyleIcon = 0, //图标
    BankImageStyleSmallIcon, //小图标
    BankImageStyleBackground, //背景图
}BankImageStyle;
//根据银行名获取银行图片
+ (NSString *)conversionBankImgNameWithBankCode:(NSString*)strBankCode style:(BankImageStyle)style;
+ (NSString *)conversionBankImgNameWithBankName:(NSString*)strBankName style:(BankImageStyle)style;


typedef enum
{
    StarStringStyleRealName = 0, //姓名
    StarStringStyleIDCard,      //身份证
    StarStringStyleCardNo,      //银行卡卡号
    StarStringStyleMobileNo,    //手机号
}StarStringStyle;
//文本串打星号
+ (NSString *)conversionStarWithString:(NSString *)inputText style:(StarStringStyle)style;


//图片存Document
+ (NSString *)getFilePathWithName:(NSString *)fileName;
+ (void)saveFileWithImage:(UIImage *)image Name:(NSString *)fileName;
+ (void)deleteFileWithName:(NSString *)fileName;

//  入参是NSDate类型
- (int)junc_CompareOneDate:(NSDate *)oneDate withAnotherDate:(NSDate *)anotherDate;
//  入参是NSString类型
- (int)junc_CompareOneDateStr:(NSString *)oneDateStr withAnotherDateStr:(NSString *)anotherDateStr;
//获取32位随机uuid
+ (NSString *)get32ArcUUID;

//金钱每三位加一个逗号
+(NSString *)countNumAndChangeformat:(NSString *)num;
//签名
+ (NSString *)getSign:(NSDictionary *)tempDict;
//获取32位随机串
+ (NSString *)getNonceStr;
//获取当前时间
+ (NSString *)getDate;

+ (NSString *)getChangeMoney:(NSString *)money;

+ (NSString *)umengErrMsg:(NSError *)error;
//判断是否为空字符串
+ (BOOL)judgeIsEmptyWithString:(NSString *)string;
@end
